#include "controlDevice.h"
#include <string.h>

struct controlDevice* findDeviceByName(char *name,struct controlDevice*phead)
{
    struct controlDevice *tmp = phead;
    if(phead == NULL)
    {
        return NULL;
    }else
    {
        while( tmp != NULL)        
        {
            if(strcmp(tmp -> name,name) == 0)
            {
                return tmp;
            }
            tmp = tmp -> Next;            
        }
        return NULL;
    }

}
